<?php
	include("includes/connect.php");
	include("includes/function.php");

	$tablename = "company";

	$db = new myDBS;

	$where = "xxx_id = '$xxx_id' and creditor_name IS NOT NULL";
	$result = $db->showData1($tablename, $where);

?>
<table class="table table-bordered" width="100%">
	<thead>
		<tr bgcolor="#e5e5e5">
		<th>ชื่อ - นามสกุล / บริษัท</th>
		<th>จำนวนเงิน</th>
		
		</tr>
	</thead>
	<tbody>
		<?php
			while ( $rows = $db->fetch_object ( $result )){
		?>
		<tr>
			<td><?php echo $rows->creditor_name; ?></td>
			<td><?php echo $rows->amount; ?></td>
			
		</tr>
		<?php
			}
		?>

	</tbody>
</table>